home *** CD-ROM | disk | FTP | other *** search
/ Developer CD Series 1994 November: Tool Chest / Dev.CD Nov 94.toast / New System Software Extensions / OpenDoc A6 / OpenDoc Parts Framework / OPF / Examples / Draw / Include / DrawFacet.h < prev    next >
Encoding:
Text File  |  1994-04-21  |  2.8 KB  |  81 lines  |  [TEXT/MPS ]

  1. //========================================================================================
  2. //
  3. //    File:                DrawFacet.h
  4. //    Release Version:    $ 1.0d1 $
  5. //
  6. //    Author:                Henri Lamiraux
  7. //    Creation Date:        3/28/94
  8. //
  9. //    Copyright:    © 1993, 1994 by Apple Computer, Inc., all rights reserved.
  10. //
  11. //========================================================================================
  12.  
  13. #ifndef DRAWFACET_H
  14. #define DRAWFACET_H
  15.  
  16. // ----- Framework Includes -----
  17. #ifndef FWFACET_H
  18. #include "FWFacet.h"
  19. #endif
  20.  
  21. //==============================================================================
  22. // Forward Declaration
  23. //==============================================================================
  24.  
  25. class CDrawPart;
  26. class CBaseShape;
  27. class FW_CGraphicContext;
  28.  
  29. //==============================================================================
  30. //    •• class CDrawFacet
  31. //==============================================================================
  32.  
  33. class CDrawFacet : public FW_CFacet
  34. {
  35. //------------------------------------------------------------------------------
  36. //    • Initialization/destruction
  37. //------------------------------------------------------------------------------
  38. public:
  39.     CDrawFacet();
  40.     void IDrawFacet(XMPFacet* facet, CDrawPart* drawPart);
  41.     virtual ~CDrawFacet();
  42.  
  43. //------------------------------------------------------------------------------
  44. //    • Inherited API
  45. //------------------------------------------------------------------------------
  46. public:    
  47.     virtual void             Draw(FW_CGraphicContext *gc);
  48.  
  49.     virtual void            MouseEnter(const FW_CPoint& where);    
  50.     virtual FW_Boolean        DoMouseDown(const FW_CPoint& where,
  51.                                          XMPEventData event);
  52.     virtual FW_Boolean        DoMouseDownInEmbeddedFrame(XMPFacet* embeddedXMPFacet, 
  53.                                                         const FW_CPoint& where, 
  54.                                                         XMPEventData event);
  55.     virtual FW_Boolean        DoMouseDownInEmbeddedFrameBorder(XMPFacet* embeddedXMPFacet, 
  56.                                                             const FW_CPoint& where, 
  57.                                                             XMPEventData event);
  58.     virtual void            ClipEmbeddedFacets();
  59.     
  60.     virtual XMPFacet*        CreateEmbeddedFacet(FW_CProxyFrame *itsFrame, 
  61.                                                 XMPShape* clipShape, 
  62.                                                 XMPTransform* externalTransform, 
  63.                                                     XMPFacet* siblingFacet, 
  64.                                                 XMPFramePosition position);
  65. //------------------------------------------------------------------------------
  66. //    • New API
  67. //------------------------------------------------------------------------------
  68. public:
  69.     void                    DrawGrid(FW_CGraphicContext* gc);
  70.         
  71. protected:
  72.     CBaseShape*             WhichShape(FW_CGraphicContext* gc, FW_SPlatformPoint mouse, XMPEventData event);
  73.  
  74. //------------------------------------------------------------------------------
  75. //    • Data Members
  76. //------------------------------------------------------------------------------
  77. private:
  78.     CDrawPart*                fDrawPart;
  79.     EventRecord                fLastDownInEmbeddedFrame;
  80. };
  81. #endif